import service from '/@/utils/request';
import axios from 'axios';

export function get_list(name: string,time: string, page_no: number, page_size: number) {
    return service.post<any>("/order/list", {
            name: name,
            time: time,
            pageSize: page_size,
            pageNo: page_no,

    })
}

export function add(company_id: string,order_time: string,goods_list: string,   amount: number,deliver_tel: string, carrier: string,receiving: string, note: string, address: string) {
    return service.post<any>("/order/add", {
        company_id: company_id,
        goods_list: goods_list,
        order_time:order_time,
        amount: amount,
        deliver_tel :deliver_tel,
        carrier: carrier,
        receiving: receiving,
        note: note,
        address :address
    })
}

export function update(id:string,company_id: string,order_time: string,goods_list: string,   amount: number,deliver_tel: string, carrier: string,receiving: string, note: string, address: string){
    return service.post<any>("/order/update", {
        id: id,
        company_id: company_id,
        goods_list: goods_list,
        order_time:order_time,
        amount: amount,
        deliver_tel :deliver_tel,
        carrier: carrier,
        receiving: receiving,
        note: note,
        address :address

    })
}

export function del(id:string) {
    return service.post<any>("/order/del", {
        id: id
    })
}
export function get_one(id:string) {
    return service.post<any>("/order/get_one", {
        id: id
    })
}
export function get_data_download(id:string) {
    return service.post<any>("/order/export", {
        id: id
    })
}
